package com.model.dto;

import lombok.Getter;
import lombok.Setter;

import java.util.Calendar;
import java.util.Date;

public class AppointResultDTO {

    public AppointResultDTO(Date time){
        this.time = time;
    }
    @Setter
    @Getter
    private Date time;


    @Setter
    private String timeStart;
    public String getTimeStart(){
        return this.time.toString();
    }

    @Setter
    private String timeEnd;

    public String getTimeEnd(){
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(this.time);
        calendar.add(Calendar.HOUR_OF_DAY, 2);
        return calendar.getTime().toString();
    }
}
